package cn.wolfcode.crm.web.filter;

import org.junit.Test;

import java.sql.Time;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class test {
@Test
public void test(){

    String format = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
    SimpleDateFormat format1 = new SimpleDateFormat("yyyy-MM-dd");
    Date date = null;
    try {
         date = format1.parse(format);
    } catch (ParseException e) {
        e.printStackTrace();
    }
    System.out.println(date+"111");
    System.out.println(format);
    System.out.println(new Date());
    try {
        Date date3 = new SimpleDateFormat("yyyy-MM-dd").parse("2011-12-17");
        System.out.println(date3.toString());
    } catch (ParseException e) {
        e.printStackTrace();
    }
}
}
